Skip to content

fix(plugin): auto-create mcp.json for MCP server connectivity#1106

Merged
JeremyDev87 merged 1 commit into
masterfrom
fix/auto-create-mcp-json-1100
Apr 1, 2026
Merged

fix(plugin): auto-create mcp.json for MCP server connectivity#1106
JeremyDev87 merged 1 commit into
masterfrom
fix/auto-create-mcp-json-1100

Conversation

@JeremyDev87

Copy link
Copy Markdown
Owner

Summary

  • Plugin installation did not create ~/.claude/mcp.json, causing MCP tools to be unavailable
  • build.ts: Add createMcpJson() to generate .mcp.json for npm package inclusion
  • session-start.py: Add _ensure_mcp_json() to create/merge codingbuddy entry into ~/.claude/mcp.json at runtime
  • Preserves existing MCP server configurations (only adds codingbuddy if missing)
  • Does not overwrite user's custom codingbuddy configuration
  • Handles corrupted mcp.json gracefully

Test plan

  • test_creates_mcp_json_when_missing — creates file with codingbuddy entry
  • test_merges_into_existing_mcp_json — adds entry while preserving other servers
  • test_does_not_overwrite_existing_codingbuddy — respects user customizations
  • test_handles_corrupted_mcp_json — recovers from invalid JSON
  • All 29 session-start tests pass
  • yarn build generates .mcp.json in plugin directory

Closes #1100

Plugin installation did not create ~/.claude/mcp.json, causing MCP
tools (parse_mode, etc.) to be unavailable despite plugin hooks working.

- Add createMcpJson() to build.ts — generates .mcp.json for npm package
- Add _ensure_mcp_json() to session-start.py — creates or merges
  codingbuddy entry into ~/.claude/mcp.json at runtime
- Preserve existing MCP server configurations (only adds codingbuddy)
- Do not overwrite user's custom codingbuddy configuration
- Handle corrupted mcp.json gracefully (fallback to empty)
- 4 new tests for mcp.json creation/merge/preserve/corruption

Closes #1100
@JeremyDev87 JeremyDev87 added the bug Something isn't working label Apr 1, 2026
@vercel

vercel Bot commented Apr 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codingbuddy-landing Ready Ready Preview, Comment Apr 1, 2026 5:14am

@JeremyDev87 JeremyDev87 self-assigned this Apr 1, 2026
@JeremyDev87 JeremyDev87 merged commit a40e93a into master Apr 1, 2026
28 checks passed
@JeremyDev87 JeremyDev87 deleted the fix/auto-create-mcp-json-1100 branch April 1, 2026 05:16
@JeremyDev87 JeremyDev87 mentioned this pull request Apr 1, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Plugin installed but MCP tools not working - missing ~/.claude/mcp.json

1 participant